import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

export const constRouterMap = [
    // {
    //     path: '*',
    //     component: resolve => require(['../views/NotFound.vue'], resolve),
    // },
    {
        path: '',
        redirect: '/home'
    },
    {
        path: '/home',
        component: resolve => require(['../views/home/home.vue'], resolve),
        meta: {
            hasTarBar: true
        }
    },
    {
        path: '/video',
        component: resolve => require(['../views/video/video.vue'], resolve),
        meta: {
            hasTarBar: true
        }
    },
    {
        path: '/profile',
        component: resolve => require(['../views/profile/profile.vue'], resolve),
        meta: {
            hasTarBar: true
        }
    },
    {
        path: '/demo',
        component: resolve => require(['../views/demo.vue'], resolve),
    },
];

export const asyncRouterMap = [];

export default new Router({
    mode: 'history',
    routes: constRouterMap
})